/**
 * Auth CSS - ControlDiario
 *
 * Estilos para páginas de autenticación (login, registro, etc.)
 * Diseño centrado y responsive sin header/footer
 */

/* ==========================================================================
   CONTENEDOR PRINCIPAL DE LOGIN
   ========================================================================== */

.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

/* ==========================================================================
   CARD DE LOGIN
   ========================================================================== */

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   HEADER DEL LOGIN
   ========================================================================== */

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    font-size: 35px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.login-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.login-subtitle {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
}

/* ==========================================================================
   FORMULARIO DE LOGIN
   ========================================================================== */

.login-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.9rem;
}


.input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.input-group:focus-within {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group i {
    position: absolute;
    left: 15px;
    color: #6c757d;
    font-size: 16px;
    z-index: 2;
}

.input-group input {
    width: 100%;
    padding: 15px 50px 15px 45px;
    border: none;
    background: transparent;
    border-radius: 12px;
    font-size: 15px;
    transition: color 0.3s ease;
}

.input-group input:focus {
    outline: none;
}

.input-group input::placeholder {
    color: #adb5bd;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: color 0.3s ease;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: #495057;
}

/* ==========================================================================
   OPCIONES DEL FORMULARIO
   ========================================================================== */

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #495057;
    -webkit-user-select: none;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked+.checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked+.checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #545b9e;
    text-decoration: underline;
}

/* ==========================================================================
   BOTÓN DE LOGIN
   ========================================================================== */

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.login-btn:hover::before {
    left: 100%;
}

/* ==========================================================================
   FOOTER DEL LOGIN
   ========================================================================== */

.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.login-footer p {
    margin: 0 0 15px 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #545b9e;
    text-decoration: underline;
}

.login-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
}

.login-links span {
    color: #dee2e6;
}

/* ==========================================================================
   INFORMACIÓN DEL SISTEMA
   ========================================================================== */

.system-info {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    z-index: 1;
}

.info-card {
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    color: white;
}

.info-card h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.info-card li i {
    color: #4ade80;
    font-size: 12px;
}

.info-card p {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ==========================================================================
   ALERTAS Y MENSAJES
   ========================================================================== */

.caps-lock-warning {
    background: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 3px solid #ffc107;
}

.caps-lock-warning i {
    color: #f57c00;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Tablets */
@media (max-width: 1024px) {
    .system-info {
        display: none;
    }

    .login-container {
        justify-content: center;
    }
}

/* Móviles */
@media (max-width: 768px) {
    .login-container {
        padding: 15px;
    }

    .login-card {
        padding: 30px 25px;
        border-radius: 15px;
    }

    .login-logo {
        width: 70px;
        height: 70px;
        font-size: 30px;
    }

    .login-title {
        font-size: 1.8rem;
    }

    .form-options {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .login-card {
        padding: 25px 20px;
        margin: 10px;
    }

    .login-title {
        font-size: 1.6rem;
    }

    .input-group input {
        padding: 12px 45px 12px 40px;
        font-size: 14px;
    }

    .login-btn {
        padding: 12px;
        font-size: 15px;
    }
}

/* ==========================================================================
   MODO OSCURO (opcional)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .login-card {
        background: #1e293b;
        color: #f1f5f9;
    }

    .login-title {
        color: #f1f5f9;
    }

    .login-subtitle {
        color: #94a3b8;
    }

    .form-group label {
        color: #e2e8f0;
    }

    .input-group input {
        background: #334155;
        border-color: #475569;
        color: #f1f5f9;
    }

    .input-group input:focus {
        background: #334155;
        border-color: #667eea;
    }

    .input-group input::placeholder {
        color: #64748b;
    }

    .checkbox-label {
        color: #e2e8f0;
    }

    .login-footer {
        border-top-color: #334155;
    }

    .login-footer p {
        color: #94a3b8;
    }
}
