﻿:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    background: var(--gradient-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-container {
    width: 100%;
    max-width: 440px;
}

.login-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.login-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
}

.login-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
}

.login-body {
    padding: 2rem;
}

.form-control {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

    .form-control:focus {
        border-color: var(--accent-color);
        box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
    }

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 5;
}

.input-with-icon {
    padding-left: 45px;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    z-index: 5;
}

.btn-login {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

.alert {
    border-radius: 0.5rem;
    border: none;
}



/* Animaciones */
.animate__animated.animate__fadeInUp {
    --animate-duration: 0.6s;
}

.animate__animated.animate__delay-1s {
    --animate-delay: 0.3s;
}

/* Modo oscuro */
[data-bs-theme="dark"] body {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

[data-bs-theme="dark"] .login-card {
    background: rgba(40, 40, 48, 0.95);
    color: #e9ecef;
}

[data-bs-theme="dark"] .form-control {
    background-color: #2a3042;
    border-color: #3a4154;
    color: #e9ecef;
}

    [data-bs-theme="dark"] .form-control:focus {
        border-color: var(--accent-color);
        background-color: #2a3042;
        color: #e9ecef;
    }

[data-bs-theme="dark"] .input-icon {
    color: #8a93a2;
}

[data-bs-theme="dark"] .theme-toggle,
[data-bs-theme="dark"] .home-button {
    background: rgba(0, 0, 0, 0.2);
    color: #e9ecef;
}

    [data-bs-theme="dark"] .theme-toggle:hover,
    [data-bs-theme="dark"] .home-button:hover {
        background: rgba(0, 0, 0, 0.3);
    }

/* Responsive */
@media (max-width: 576px) {
    .login-container {
        padding: 10px;
    }

    .login-body {
        padding: 1.5rem;
    }

    .button-group {
        top: 10px;
        right: 10px;
    }

    .theme-toggle, .home-button {
        width: 40px;
        height: 40px;
    }

        .theme-toggle i, .home-button i {
            font-size: 1.1rem;
        }
}

/* Tooltip para los botones */
.tooltip-text {
    position: absolute;
    top: 100%;
    left: 50%;
    margin-top: 8px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateX(-50%);
    pointer-events: none;
}

.theme-toggle:hover .tooltip-text,
.home-button:hover .tooltip-text {
    opacity: 1;
    visibility: visible;
}

.button-group {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.home-button, .theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    color: #5a5c69;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.theme-toggle:hover, .home-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.home-button {
    text-decoration: none;
}

.login-footer {
    text-align: center;
    padding: 1rem;
    color: #6c757d;
    font-size: 0.9rem;
}